import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/hazardChemicalManage/chemicalmanage/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/hazardChemicalManage/chemicalmanage/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/hazardChemicalManage/chemicalmanage/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/hazardChemicalManage/chemicalmanage/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/hazardChemicalManage/chemicalmanage/update',
    method: 'post',
    data: row
  })
}

export const getWxhxpmchsm = () => {
  return request({
    url: '/api/blade-system/dict-biz/dictionary?code=hazardChemical_wxhxpmchsm',
    method: 'get'
  })
}

export const getBmCASHLjlLinkInfo = (wxhxpmchsm) => {
  return request({
    url: '/api/hazardChemicalManage/chemicalmanage/getBmCASHLjlLinkInfo',
    method: 'get',
    params: {
      wxhxpmchsm
    }
  })
}

export const getWxxfljsmLjlLinkInfo = (fh) => {
  return request({
    url: '/api/hazardChemicalManage/chemicalmanage/getWxxfljsmLjlLinkInfo',
    method: 'get',
    params: {
      fh
    }
  })
}
